/**
 * UserApplication
 * Classe singleton de usuario do sistema
 * 
 */
package com.br.flexpront.model
{
	[Bindable]
	public class UserApplication 
	{
		
		static private var _userApplication : UserApplication;
		private var _user : Usuario;
		
		public function UserApplication( lock : LockSingleton)
		{
			if(lock == null)
				throw new Error( "Use getInstance()" );
		}
		
		
		static public function getInstance():UserApplication
		{
			if( _userApplication == null)
			{
				_userApplication = new UserApplication( new LockSingleton() );
				
			}
			
			return _userApplication;
			
		}

		public function get user():Usuario
		{
			return _user;
		}

		public function set user(value:Usuario):void
		{
			_user = value;
		}
		
		
	}
}

internal class LockSingleton{}; 